﻿<UserControl x:Class="SmallTfs.TaskGrid"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="25" />
        </Grid.RowDefinitions>
        <DataGrid  AutoGenerateColumns="False" Name="dtShangeSet" EnableRowVirtualization="True"  Background="{StaticResource NormalBorderBrush}" RowBackground="{StaticResource ButtonNormalBackground}" Grid.RowSpan="2">
            <DataGrid.Columns>
                <DataGridTextColumn  Binding="{Binding Id}" IsReadOnly="True"   Header="Id" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding Type}" IsReadOnly="True"   Header="Type" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding Title}" IsReadOnly="True"   Header="Title" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding State}" IsReadOnly="True"   Header="State" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding Source}" IsReadOnly="True"   Header="Source branch" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding AssignTo}" IsReadOnly="True"   Header="Assign to" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding ChangedDate}" IsReadOnly="True"   Header="Changed" Width="auto"/>
                 <DataGridTextColumn  Binding="{Binding CratedDate}" IsReadOnly="True"   Header="Crated date" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding AreaPath}" IsReadOnly="True"   Header="AreaPath" Width="auto"/>
                <DataGridTextColumn  Binding="{Binding IterationPath}" IsReadOnly="True"   Header="IterationPath" Width="auto"/>
                <DataGridTemplateColumn Header="Description"  IsReadOnly="True"  >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Width="100" Height="20">
                                                    <TextBlock.ToolTip>
                                                         <ToolTip>
                                                                <TextBlock Text="{Binding Description}"/>
                                                        </ToolTip>
                                                    </TextBlock.ToolTip>
                                                </TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>

            </DataGrid.Columns>



        </DataGrid>
        
        <StackPanel Orientation="Horizontal" Grid.Row="1" Visibility="Hidden">
            <Button Name="btnSelectAll" Content="Select all" Width="100" Height="23" Click="btnSelectAll_Click" />
            <Button Name="btnUnselectAll" Content="Unselect all" Width="100" Height="23" Click="btnUnselectAll_Click" />
        </StackPanel>
    </Grid>
</UserControl>
